package day06;

import java.util.Scanner;

public class txt4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s=sc.nextInt();
        int i=0;
        int ans=1;
        while (i<=s){
            ans=i*ans;
            i++;
        }
        System.out.println(ans);

    }
}
